#include<iostream>
#include<iomanip>
using namespace std;
int main()
{int n;double a,b;
 cin>>n;
 for(int i=1;i<=n;i++)
   { cin>>a>>b;
     cout<<"Scenario #"<<i<<":"<<endl;
     cout<<setprecision(30)<<(a+b)*(b-a+1)/2<<endl<<endl;}
 system ("pause");
 return 0;
}
